package com.carkeeper.pojo;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "knowledgebaseinfo",type = "docs")
@Table(name = "knowledge_base")
public class KnowledgeBaseInfo implements Serializable {

    //id
    @Id
    @Field(index = true,store = true,type = FieldType.Keyword)
    private Long id;

    //推文名称
    @Field(index = true,store = true,type = FieldType.Text,analyzer = "ik_max_word")
    private String name;

    //图片
    @Field(index = true,store = true,type = FieldType.Keyword)
    private String image;

    //内容附加图片，多个已逗号分隔
    @Field(index = true,store = true,type = FieldType.Keyword)
    private String images;

    //总体分类名称
    @Field(index = true,store = true,type = FieldType.Keyword)
    private String type;

    //一级分类id
    @Field(index = true,store = true,type = FieldType.Keyword)
    @Column(name = "type01_id")
    private String type01Id;

    //二级分类id
    @Field(index = true,store = true,type = FieldType.Keyword)
    @Column(name = "type02_id")
    private String type02Id;


    //一级分类名称
    @Column(name = "type01_name")
    @Field(index = true,store = true,type = FieldType.Keyword)
    private String type01Name;


    //二级分类名称
    @Column(name = "type02_name")
    @Field(index = true,store = true,type = FieldType.Keyword)
    private String type02Name;


    //推文内容
    @Field(index = true,store = true,type = FieldType.Text)
    private String content;


    //创建时间
    @Field(index = true,store = true,type = FieldType.Keyword)
    @Column(name = "create_time")
    private String createTime;


    //修改时间
    @Field(index = true,store = true,type = FieldType.Keyword)
    @Column(name = "update_time")
    private String updateTime;

}
